using System;
using System.Collections.Generic;
using System.Text;

using NHibernate;
using NHibernate.Data.Models;
using NHibernate.Data.Base;

namespace NHibernate.Data.Managers
{
    public partial interface IOriginCountryManager : IManagerBase<OriginCountry, long>
    {
		// Get Methods
		IList<OriginCountry> GetByClimate(System.Int64 climate);
		IList<OriginCountry> GetByIntroduction(System.Int64 introduction);
		IList<OriginCountry> GetByLocalName(System.Int64 localName);
    }

    partial class OriginCountryManager : ManagerBase<OriginCountry, long>, IOriginCountryManager
    {
		#region Constructors
		
		public OriginCountryManager() : base()
        {
        }
        public OriginCountryManager(INHibernateSession session) : base(session)
        {
        }
		
		#endregion
		
        #region Get Methods

		
		public IList<OriginCountry> GetByClimate(System.Int64 climate)
        {
            ICriteria criteria = Session.GetISession().CreateCriteria(typeof(OriginCountry));
			
			criteria.Add(NHibernate.Criterion.Expression.Eq("Climate", climate));
			
			return criteria.List<OriginCountry>();
        }
		
		public IList<OriginCountry> GetByIntroduction(System.Int64 introduction)
        {
            ICriteria criteria = Session.GetISession().CreateCriteria(typeof(OriginCountry));
			
			criteria.Add(NHibernate.Criterion.Expression.Eq("Introduction", introduction));
			
			return criteria.List<OriginCountry>();
        }
		
		public IList<OriginCountry> GetByLocalName(System.Int64 localName)
        {
            ICriteria criteria = Session.GetISession().CreateCriteria(typeof(OriginCountry));
			
			criteria.Add(NHibernate.Criterion.Expression.Eq("LocalName", localName));
			
			return criteria.List<OriginCountry>();
        }
		
		#endregion
    }
}